package com.cms.common;


import org.apache.commons.io.FileUtils;

public class FileUtil extends FileUtils{

	/**
	 *  
	 * @param file
	 * @return
	 */
	private static String getFileExt(String file)
	{
		int index =file.indexOf(".");
		String fileExt = file.substring(index);
		return fileExt;
	}
	
	/***
	 * 
	 * @param file
	 * @return
	 */
	public static String generateFile(String file)
	{
		StringBuilder sb = new StringBuilder();
		sb.append(System.nanoTime()).append(getFileExt(file));
		return sb.toString();
	}
}
